<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>缤格</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../../css/swiper.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/common.css" />
    <link rel="stylesheet" type="text/css" href="../../css/binge.css" />
    <script type="text/javascript" src="../../script/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../../script/swiper.min.js"></script>
    <script type="text/javascript" src="../../script/laydate/laydate.js"></script>
    <script type="text/javascript" src="../../script/mobile.js"></script>
    <script type="text/javascript">
        window['adaptive'].desinWidth = 750;
        window['adaptive'].baseFont = 28;
        window['adaptive'].maxWidth = 750;
        window['adaptive'].init();
    </script>
</head>

<body>
<div id="header" style="height: 0.9rem; background: #fff; position: fixed; top: 0;left: 0; width: 100%; z-index: 99">
    <!-- header -->
    <div class="header">
        <div class="head-back">
            <a href="javascript:void(0);" tapmode onclick="comeBack()" class="back-btn"></a>
        </div>
        <div class="head-title">
            <h6>报名人员</h6>
        </div>
        <!--<div class="head-action">-->
            <!--<a href="javascript:void(0);" tapmode class="action-btn"></a>-->
        <!--</div>-->
    </div>
    <!-- header end -->
</div>
<div class="mescroll" id="mescroll" style="padding-top: 1.5rem">
    <div class="activity-member">
        <ul id="memberList">
            <!--<li>
                <div class="common-user-detail">
                    <div class="user-info" style="width: 100%;">
                        <div class="user-icon bg-cover" style="background-image: url('../../image/img-tx.png');"></div>
                        <div class="info">
                            <div class="name">
                                <h6>后来熟悉</h6>
                                <dl class="badge-list">
                                    <dd class="icon"><img src="../../icon/icon-hz01.png" alt=""></dd>
                                    <dd class="icon"><img src="../../icon/icon-hz02.png" alt=""></dd>
                                    <dd class="icon"><img src="../../icon/icon-hz03.png" alt=""></dd>
                                    <dd class="icon"><img src="../../icon/icon-hz04.png" alt=""></dd>
                                    <dd class="icon"><img src="../../icon/icon-hz05.png" alt=""></dd>
                                </dl>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="member-info">
                    <div class="item">
                        <p class="label">报名时间：</p>
                        <p class="label-item">2019-10-27 19:09</p>
                    </div>
                    <div class="item">
                        <p class="label">QQ：</p>
                        <p class="label-item">359677623 </p>
                    </div>
                    <div class="item">
                        <p class="label">微信号：</p>
                        <p class="label-item">Bubble3485-ok</p>
                    </div>
                </div>
            </li>-->
        </ul>
    </div>
</div>


</body>

</html>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<link rel="stylesheet" type="text/css" href="../../css/mescroll.min.css"/>
<script type="text/javascript" src="../../script/mescroll.min.js"></script>
<script type="text/javascript">
    var activity_id = '';
    apiready = function() {

        setFixStatusBar(); //设置状态栏

        activity_id = api.pageParam.activity_id;
        keybackListener()
        pop.loading()


        getList()
    };
    //创建MeScroll对象
    var mescroll = new MeScroll("mescroll", {
        down: {
            auto: false, //是否在初始化完毕之后自动执行下拉回调callback; 默认true
            callback: downCallback //下拉刷新的回调
        }
    });
    /*下拉刷新的回调 */
    function downCallback() {
        getList()

        //mescroll.endErr();
    }

   function getList() {
       var param = {
           token: $api.getStorage('token'),
           activity_id:activity_id,
       }
       getAjax(Interface.get_activity_list,param,function (res) {
           var data = res.data;
           if(isDefine(data)){

               var listHtml = '';
               $.each(data,function (i, item) {
                    var userData = item.member;
                    var badgeList = '';
                   if (isDefine(userData.badge_path)) {
                       for (var k = 0; k < userData.badge_path.length; k++) {
                           if (k < 5) {
                               badgeList += '<dd class="icon"><img src="' + ajaxUrl + userData.badge_path[k] + '" alt=""></dd>'
                           }
                       }
                   }

                   var user = {'member_id': userData.id};
                   var userInfo = '<div class="common-user-detail">' +
                       '           <div class="user-info" style="width: 100%;" tapmode onclick=\'commonUrl("../activity/person_index",' + jsonChange(user) + ')\'>' +
                       '               <div class="user-icon bg-cover" style="background-image: url(' + ajaxUrl + userData.icon_path + ');"></div>' +
                       '               <div class="info">' +
                       '                    <div class="name">' +
                       '                        <h6>' + userData.name + '</h6>' +
                       '                        <dl class="badge-list" tapmode onclick="toBadgePage(event)">' + badgeList + '</dl>' +
                       '                    </div>' +
                       '                </div>' +
                       '            </div>' +
                       '        </div>';

                   var info = '';
                   $.each(item.data,function (j, jtem) {
                       info +='<div class="item"><p class="label">'+jtem.title+'：</p><p class="label-item">'+jtem.content+' </p></div>'
                   });


                   listHtml += '<li>'+userInfo+
                       '                <div class="member-info">' +
                       '                    <div class="item">' +
                       '                        <p class="label">报名时间：</p>' +
                       '                        <p class="label-item">'+item.date+'</p>' +
                       '                    </div>' + info +
                       '                </div>' +
                       '            </li>'

               })

               $("#memberList").html(listHtml)
           }else {
               $("#memberList").html(noData)
           }
           mescroll.endErr()
           pop.close()
       },function (error) {
           $("#memberList").html(noData)
           pop.notice(error.msg)
           mescroll.endErr()
           pop.close()

       })
   }


</script>
